package com.psds.quartz;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.listeners.JobListenerSupport;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * author: cjianquan
 * date: 2016/8/25
 */
public class HelloJob extends JobListenerSupport implements Job {
    @Override
    public String getName() {
        return "HelloJob111";
    }

    public HelloJob(){}

    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

        System.out.println(sdf.format(new Date())+":test");
    }
}
